<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/assets/js/jquery.min.js"></script>
<title>登陆</title>
</head>
<body>
	<center>
		<form>
			<table style="height: 10px">
				<tr>
					<td>名称:</td>
					<td><input type="text" id="userName" value=""></td>
				</tr>
				<tr>
					<td>密码:</td>
					<td><input type="text" id="poss" value=""></td>
				</tr>

			</table>
			<div>
				<input type="button" value="登陆" onclick="land()"> <a
					href="/test/register"><input type="button" value="注册"></input></a>
			</div>
		</form>
		<script type="text/javascript">
			function land() {
				var userName = $('#userName').val();
				var poss = $('#poss').val();
				if (userName == 0 || poss == 0) {
					alert("请输入完整信息");
				} else {
					$.ajax({
						url : '/user/land',
						dataType : 'json',
						data : {
							"userName" : userName,
							"poss" : poss
						},
						type : 'post',
						
						success:function(msg){
							
							console.info(msg)
			                if(success){
			                    console.log('添加成功');
			                }else{
			                    console.log('添加失败')
			                }
			            }
					/* window.location.href="/html/test.jsp"; */
					})
				}

			}
		</script>
	</center>
</body>
</html>